//
//  Section1Controller.swift
//  Space Experiment Module
//
//  Created by 曹亚索 on 2020/12/18.
//
//MARK:游戏章节控制器
import UIKit
import SpriteKit
class SectionController: UIViewController {

    var score = 0
    var sectionVer = 1
    override func viewDidLoad() {
        super.viewDidLoad()
//        if let spriteView = self.view as? SKView{
//            spriteView.showsFPS = true
//            spriteView.showsDrawCount = true
//            spriteView.showsNodeCount = true
//
//        }

        // Do any additional setup after loading the view.
    }

    override func viewWillAppear(_ animated: Bool) {
        switch sectionVer {
        case 1:
            let scene = Section1Scene()
            scene.viewcontroller = self
                scene.size = self.view.bounds.size
                if let spriteView = self.view as? SKView{
                    spriteView.presentScene(scene)
                }
        case 2:
            let scene = Section2Scene()
            scene.viewcontroller = self
                scene.size = self.view.bounds.size
                if let spriteView = self.view as? SKView{
                    spriteView.presentScene(scene)
                }
        default:
            break
        }
}

    
    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destination.
        // Pass the selected object to the new view controller.
    }
    */

}
